# @Time    :2025/3/27 22:04
#数值类型不可以直接转成容器类型，需要借助str-------------------------------------

num = 123
digit_list = [int(digit) for digit in str(num)]
print(digit_list)  # 输出：[1, 2, 3]

num = 123
digit_tuple = tuple(int(digit) for digit in str(num))
print(digit_tuple)  # 输出：(1, 2, 3)

num = 123
digit_dict = {i: int(digit) for i, digit in enumerate(str(num))}
print(digit_dict)  # 输出：{0: 1, 1: 2, 2: 3}

num = 123
digit_set = set(int(digit) for digit in str(num))
print(digit_set)  # 输出：{1, 2, 3}